home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / ispell-3.1.18src / languages / british / makefile
Makefile  |  1995-01-23  |  13KB  |  393 lines

  1. #
  2. # $Id: Makefile,v 1.4 1995/01/08 23:24:18 geoff Exp $
  3. #
  4. # Copyright 1994, Geoff Kuenning, Granada Hills, CA
  5. # All rights reserved.
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions
  9. # are met:
  10. #
  11. # 1. Redistributions of source code must retain the above copyright
  12. #    notice, this list of conditions and the following disclaimer.
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. #    notice, this list of conditions and the following disclaimer in the
  15. #    documentation and/or other materials provided with the distribution.
  16. # 3. All modifications to the source code must be clearly marked as
  17. #    such.  Binary redistributions based on modified source code
  18. #    must be clearly marked as modified versions in the documentation
  19. #    and/or other materials provided with the distribution.
  20. # 4. All advertising materials mentioning features or use of this software
  21. #    must display the following acknowledgment:
  22. #      This product includes software developed by Geoff Kuenning and
  23. #      other unpaid contributors.
  24. # 5. The name of Geoff Kuenning may not be used to endorse or promote
  25. #    products derived from this software without specific prior
  26. #    written permission.
  27. #
  28. # THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
  29. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  30. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  31. # ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
  32. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  37. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  38. # SUCH DAMAGE.
  39. #
  40. # This Makefile allows a single installation to build an British
  41. # variant of ispell's English dictionary.  It depends on the
  42. # languages/english directory for most of its input files.
  43. #
  44. # $Log: Makefile,v $
  45. # Revision 1.4  1995/01/08  23:24:18  geoff
  46. # Remember to set SHELLDEBUG when making dictcomponents.
  47. #
  48. # Revision 1.3  1994/08/31  05:58:54  geoff
  49. # Create directories before installing into them, and be sure to set the
  50. # proper modes on manual pages.
  51. #
  52. # Revision 1.2  1994/05/17  06:37:42  geoff
  53. # Explicitly specify the affix files with a path so that initial
  54. # installation will work correctly.
  55. #
  56. # Revision 1.1  1994/04/27  02:45:55  geoff
  57. # Initial revision
  58. #
  59. #
  60.  
  61. SHELL = /bin/sh
  62. MAKE = make
  63.  
  64. CONFIG        =    ../../config.sh
  65. PATHADDER    =    ../..
  66. BUILDHASH    =    ../../buildhash
  67.  
  68. # The following variables should be set by the superior Makefile,
  69. # based on the LANGUAGES variable in config.X.
  70. #
  71. # There are four progressively-larger English dictionaries distributed
  72. # with ispell.  These are named english.sml, english.med, english.lrg,
  73. # and english.xlg.  For each of these, you can also build a "plus"
  74. # version (english.sml+, etc.)  which is created by combining the
  75. # distributed version with an "extra" dictionary defined by EXTRADICT,
  76. # usually /usr/dict/words.  The "plus" versions of dictionaries
  77. # require lots of time and temporary file space; make sure you have
  78. # set TMPDIR appropriately.
  79. #
  80. # The dictionaries to be built are listed in the MASTERDICTS variable,
  81. # separated by spaces.  The hash files to be built (and installed) are
  82. # listed in the HASHFILES variable.  Hash files are named as
  83. # "british<xxx>.hash", where <xxx> is the suffix of dictionary (e.g.,
  84. # "med+").  The first-listed hash file will also be installed under
  85. # the name "british.hash".  As a general rule, the dictionaries
  86. # needed to build the HASHFILES must be listed in the MASTERDICTS
  87. # variable.
  88. #
  89. # If you change AFFIXES for english, you should consider also changing
  90. # DEFLANG (in config.X) to match.
  91. #
  92. MASTERDICTS    =    Use_LANGUAGES_from_config.X
  93. HASHFILES    =    Use_LANGUAGES_from_config.X
  94. EXTRADICT    =    Use_LANGUAGES_from_config.X
  95.  
  96. #
  97. # The following variables may be overridden by the superior Makefile,
  98. # based on the LANGUAGES variable in config.X.
  99. #
  100. AFFIXES    =    english.aff
  101. LANGUAGE =    british
  102.  
  103. #
  104. # DICTSRC specifies where the dictionary sources are found.  You
  105. # should not have to change this.
  106. #
  107. DICTSRC =    ../english
  108.  
  109. #
  110. #    Set this to "-vx" in the make command line if you need to
  111. #    debug the complex shell commands.
  112. #
  113. SHELLDEBUG = +vx
  114.  
  115. all:  $(CONFIG)
  116.     @set $(SHELLDEBUG); \
  117.     if [ ! -r english.0 ]; \
  118.     then \
  119.         $(MAKE) SHELLDEBUG=$(SHELLDEBUG) CBUILD= dictcomponents; \
  120.     else \
  121.         : ; \
  122.     fi
  123.     @set $(SHELLDEBUG); \
  124.     for dict in $(MASTERDICTS); do \
  125.         if [ ! -r $$dict ]; \
  126.         then \
  127.         $(MAKE) DBUILD= \
  128.           'EXTRADICT=$(EXTRADICT)' 'DICTSRC=$(DICTSRC)' \
  129.           SHELLDEBUG=$(SHELLDEBUG) $$dict; \
  130.         else \
  131.         : ; \
  132.         fi; \
  133.     done
  134.     $(MAKE) SHELLDEBUG=$(SHELLDEBUG) $(HASHFILES)
  135.  
  136. install:    all $(CONFIG)
  137.     @. $(CONFIG); \
  138.       set -x; \
  139.       [ -d $$LIBDIR ]  ||  (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \
  140.       cd $$LIBDIR; rm -f english.aff $(HASHFILES) $(LANGUAGE).hash
  141.     @. $(CONFIG); \
  142.       set -x; \
  143.       cp $(DICTSRC)/english.aff $(HASHFILES) $$LIBDIR
  144.     @. $(CONFIG); \
  145.       set -x; \
  146.       cd $$LIBDIR; \
  147.       chmod 644 english.aff $(HASHFILES); \
  148.       for i in $(HASHFILES); do \
  149.         ln $$i $(LANGUAGE).hash; \
  150.         break; \
  151.       done
  152.     @. $(CONFIG); \
  153.       set -x; \
  154.       [ -d $$MAN4DIR ]  ||  (mkdir $$MAN4DIR; chmod 755 $$MAN4DIR); \
  155.       cd $$MAN4DIR; \
  156.         rm -f english$$MAN4EXT
  157.     @. $(CONFIG); \
  158.       set -x; \
  159.       cp $(DICTSRC)/english.4l $$MAN4DIR/english$$MAN4EXT; \
  160.       chmod 644 $$MAN4DIR/english$$MAN4EXT
  161.  
  162. #
  163. #    Dependencies to build extra hash files
  164. #
  165. allhashes:    normhashes plushashes
  166. normhashes:    britishsml.hash britishmed.hash
  167. normhashes:    britishlrg.hash britishxlg.hash
  168. plushashes:    britishsml+.hash britishmed+.hash
  169. plushashes:    britishlrg+.hash britishxlg+.hash
  170.  
  171. britishsml.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.sml
  172.     rm -f britishsml.hash
  173.     $(BUILDHASH) british.sml $(DICTSRC)/$(AFFIXES) britishsml.hash
  174.  
  175. britishsml+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.sml+
  176.     rm -f britishsml+.hash
  177.     $(BUILDHASH) british.sml+ $(DICTSRC)/$(AFFIXES) britishsml+.hash
  178.  
  179. britishmed.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.med
  180.     rm -f britishmed.hash
  181.     $(BUILDHASH) british.med $(DICTSRC)/$(AFFIXES) britishmed.hash
  182.  
  183. britishmed+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.med+
  184.     rm -f britishmed+.hash
  185.     $(BUILDHASH) british.med+ $(DICTSRC)/$(AFFIXES) britishmed+.hash
  186.  
  187. britishlrg.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.lrg
  188.     rm -f britishlrg.hash
  189.     $(BUILDHASH) british.lrg $(DICTSRC)/$(AFFIXES) britishlrg.hash
  190.  
  191. britishlrg+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.lrg+
  192.     rm -f britishlrg+.hash
  193.     $(BUILDHASH) british.lrg+ $(DICTSRC)/$(AFFIXES) britishlrg+.hash
  194.  
  195. britishxlg.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.xlg
  196.     rm -f britishxlg.hash
  197.     $(BUILDHASH) british.xlg $(DICTSRC)/$(AFFIXES) britishxlg.hash
  198.  
  199. britishxlg+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) british.xlg+
  200.     rm -f britishxlg+.hash
  201.     $(BUILDHASH) british.xlg+ $(DICTSRC)/$(AFFIXES) britishxlg+.hash
  202.  
  203. #
  204. #    The eight dictionaries, british.sml through british.xlg+, are
  205. #    built by the following dependencies.  The macros "CBUILD" and
  206. #    "DBUILD" are a sneaky trick used to keep make from trying to
  207. #    run munchlist every time a minor change is made to one of the
  208. #    C programs.  If you define these macros as null, "make all"
  209. #    will automatically build the dictionaries.  If you leave them
  210. #    with their default definitions, "make all" will leave the
  211. #    dictionaries alone, and you will have to type something like
  212. #    "make buildbritish.med+" to build the dictionary using
  213. #    munchlist.
  214. #
  215. #    Why two macros?  So you can delete {eng,amer,altamer,brit}.[012].??
  216. #    to save space, and still type "make DBUILD= all".
  217. #
  218. #    The following dependencies are convenient ways to make some or
  219. #    all of the dictionaries.
  220. #
  221. BUILD    =    build
  222. CBUILD    =    $(BUILD)
  223. DBUILD    =    $(BUILD)
  224.  
  225. alldicts:    normdicts plusdicts
  226. normdicts:    $(DBUILD)british.sml
  227. normdicts:    $(DBUILD)british.med
  228. normdicts:    $(DBUILD)british.lrg
  229. normdicts:    $(DBUILD)british.xlg
  230. plusdicts:    $(DBUILD)british.sml+
  231. plusdicts:    $(DBUILD)british.med+
  232. plusdicts:    $(DBUILD)british.lrg+
  233. plusdicts:    $(DBUILD)british.xlg+
  234.  
  235. $(DBUILD)british.sml:    $(DBUILD)english.sml
  236.     rm -f british.sml
  237.     ln english.sml british.sml
  238.  
  239. $(DBUILD)english.sml:    $(CONFIG)
  240. $(DBUILD)english.sml:    english.0
  241. $(DBUILD)english.sml:    british.0
  242.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  243.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  244.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  245.       english.sml
  246.  
  247. $(DBUILD)british.sml+:    $(DBUILD)english.sml+
  248.     rm -f british.sml+
  249.     ln english.sml+ british.sml+
  250.  
  251. $(DBUILD)english.sml+:    $(CONFIG)
  252. $(DBUILD)english.sml+:    english.0
  253. $(DBUILD)english.sml+:    british.0
  254.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  255.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  256.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  257.       english.sml+
  258.  
  259. $(DBUILD)british.med:    $(DBUILD)english.med
  260.     rm -f british.med
  261.     ln english.med british.med
  262.  
  263. $(DBUILD)english.med:    $(CONFIG)
  264. $(DBUILD)english.med:    english.0
  265. $(DBUILD)english.med:    british.0
  266.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  267.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  268.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  269.       english.med
  270.  
  271. $(DBUILD)british.med+:    $(DBUILD)english.med+
  272.     rm -f british.med+
  273.     ln english.med+ british.med+
  274.  
  275. $(DBUILD)english.med+:    $(CONFIG)
  276. $(DBUILD)english.med+:    english.0
  277. $(DBUILD)english.med+:    british.0
  278.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  279.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  280.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  281.       english.med+
  282.  
  283. $(DBUILD)british.lrg:    $(DBUILD)english.lrg
  284.     rm -f british.lrg
  285.     ln english.lrg british.lrg
  286.  
  287. $(DBUILD)english.lrg:    $(CONFIG)
  288. $(DBUILD)english.lrg:    english.0
  289. $(DBUILD)english.lrg:    british.0
  290.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  291.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  292.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  293.       english.lrg
  294.  
  295. $(DBUILD)british.lrg+:    $(DBUILD)english.lrg+
  296.     rm -f british.lrg+
  297.     ln english.lrg+ british.lrg+
  298.  
  299. $(DBUILD)english.lrg+:    $(CONFIG)
  300. $(DBUILD)english.lrg+:    english.0
  301. $(DBUILD)english.lrg+:    british.0
  302.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  303.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  304.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  305.       english.lrg+
  306.  
  307. $(DBUILD)british.xlg:    $(DBUILD)english.xlg
  308.     rm -f british.xlg
  309.     ln english.xlg british.xlg
  310.  
  311. $(DBUILD)english.xlg:    $(CONFIG)
  312. $(DBUILD)english.xlg:    english.0
  313. $(DBUILD)english.xlg:    british.0
  314.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  315.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  316.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  317.       english.xlg
  318.  
  319. $(DBUILD)british.xlg+:    $(DBUILD)english.xlg+
  320.     rm -f british.xlg+
  321.     ln english.xlg+ british.xlg+
  322.  
  323. $(DBUILD)english.xlg+:    $(CONFIG)
  324. $(DBUILD)english.xlg+:    english.0
  325. $(DBUILD)english.xlg+:    british.0
  326.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' VARIANTS=british \
  327.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  328.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  329.       english.xlg+
  330.  
  331. #
  332. #    Dependencies to create the components of the dictionaries,
  333. #    preferably by linking.  We create some components that we'll
  334. #    never use because the master English Makefile requires them.
  335. #
  336. dictcomponents:    $(CBUILD)english.0
  337. dictcomponents:    $(CBUILD)english.1
  338. dictcomponents:    $(CBUILD)english.2
  339. dictcomponents:    $(CBUILD)english.3
  340. dictcomponents: $(CBUILD)american.0
  341. dictcomponents: $(CBUILD)american.1
  342. dictcomponents:    $(CBUILD)american.2
  343. dictcomponents: $(CBUILD)altamer.0
  344. dictcomponents: $(CBUILD)altamer.1
  345. dictcomponents:    $(CBUILD)altamer.2
  346. dictcomponents: $(CBUILD)british.0
  347. dictcomponents: $(CBUILD)british.1
  348. dictcomponents:    $(CBUILD)british.2
  349.  
  350. $(CBUILD)english.0 $(CBUILD)english.1 $(CBUILD)english.2 $(CBUILD)english.3 \
  351.   $(CBUILD)american.0 $(CBUILD)american.1 $(CBUILD)american.2 \
  352.   $(CBUILD)altamer.0 $(CBUILD)altamer.1 $(CBUILD)altamer.2 \
  353.   $(CBUILD)british.0 $(CBUILD)british.1 $(CBUILD)british.2:
  354.     rm -f english.[0-3] american.[0-2] altamer.[012] british.[012]
  355.     @set $(SHELLDEBUG); \
  356.       cd $(DICTSRC); \
  357.       test -r english.0 \
  358.         ||  $(MAKE) SHELLDEBUG=$(SHELLDEBUG) CBUILD= dictcomponents
  359.     @set $(SHELLDEBUG); \
  360.     for i in english.0 english.1 english.2 english.3 \
  361.       american.0 american.1 american.2 altamer.0 altamer.1 altamer.2 \
  362.       british.0 british.1 british.2; do \
  363.         ln -s $(DICTSRC)/$$i .  ||  ln $(DICTSRC)/$$i . \
  364.           ||  cp $(DICTSRC)/$$i .; \
  365.     done
  366.  
  367. #
  368. #    The following dependency can be executed when ispell is unpacked,
  369. #    to unpack the dictionaries.
  370. #
  371. unpack:
  372.     cd $(DICTSRC); $(MAKE) SHELLDEBUG=$(SHELLDEBUG) unpack
  373.  
  374. clean:
  375.     rm -f core *.hash *.stat *.cnt
  376.  
  377. #
  378. #    The following target allows you to clean out the leftover raw
  379. #    files gotten from unpacking the kit.  It makes sure that you
  380. #    have the combined files first, so it may take a little while
  381. #    to run.
  382. #
  383. kitclean:
  384.     cd $(DICTSRC); $(MAKE) SHELLDEBUG=$(SHELLDEBUG) kitclean
  385.  
  386. #
  387. #    The following target allows you to clean out the combined
  388. #    dictionary files.
  389. #
  390. dictclean:
  391.     rm -f english.[0-3] american.[0-3] altamer.[0-3] british.[0-3]
  392.     rm -f *.sml *.sml+ *.med *.med+ *.lrg *.lrg+ *.xlg *.xlg+
  393.